package com.FrameWork.Common;

import android.app.ActionBar;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Window;

import com.baidu.mapapi.MapActivity;
import com.umeng.analytics.MobclickAgent;

public class AbstractBaseMapActivity extends MapActivity
{
	public Dialog dialog = null;
	//当前页面上下文
	
	//当前页面上下文
	public Context context= null;

	public MyApplication app = null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		context = this;
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		//this.setTheme(R.style.NoTitleDialogStyle);
		app = (MyApplication) getApplication(); 
		MyApplication.setInstance(app);
		app.addActivity(this);
		
	/*	ActionBar bar = getActionBar();
		bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_USE_LOGO| ActionBar.DISPLAY_HOME_AS_UP| ActionBar.DISPLAY_SHOW_TITLE);
		bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
		bar.setDisplayShowHomeEnabled(true);
		bar.setDisplayUseLogoEnabled(true);*/
		
	}



	

	@Override
	protected void onPause()
	{
		super.onPause();
		//使用友盟统计功能
		MobclickAgent.onPause(this);
	}

	@Override
	protected void onResume()
	{
		super.onResume();
		//使用友盟统计功能
		MobclickAgent.onResume(this);
	}

	public void exit()
	{
		app.exit();
	}


	@Override
	protected void onDestroy() {
		super.onDestroy();
		app.activityList.remove(this);
	}


	@Override
	protected boolean isRouteDisplayed() {
		// TODO Auto-generated method stub
		return false;
	}

}
